<template>
    <div :style="{minHeight : h }" class="use1">
        <header-1>
            <template v-slot:center>
               <span class="center">
                    满减使用详情
               </span>
            </template>
        </header-1>
        <van-tabs v-model="active" line-width="25px" line-height="4px" title-active-color="#ff6e53">
            <van-tab title="使用记录">
                <div class="show">
                    <div class="show_1">
                        <div class="show_2">
                            <p>订单编号：</p>
                            <p>优惠金额：</p>
                            <p>下单时间：</p>
                        </div>
                    </div>
                    <div class="show_10">
                        <span>查看活动详情</span>
                        <img src="https://cdn3.axureshop.com/demo/1525603/images/2%E9%97%A8%E5%BA%97%E4%BF%A1%E6%81%AF/u716.png" />
                    </div>
                </div>
                <div class="show_11">
                -没有更多数据了-
                </div>
            </van-tab>
            <van-tab title="数据分析">
                <van-tabs v-model="active1" type="card" title-active-color="white" color="#ff6e53" class="card1" @change="change">
                    <van-tab title="今日" title-style="height:30px"></van-tab>
                    <van-tab title="昨日" title-style="height:30px"></van-tab>
                    <van-tab title="7日内" title-style="height:30px"></van-tab>
                    <van-tab title="30日内" title-style="height:30px"></van-tab>
                    <van-tab title="全部" title-style="height:30px;"></van-tab>
                </van-tabs>
                <div class="last">
                        <div class="foot">
                            <div class="foot_1">
                                <p>活动订单数量</p>
                                <p class="foot_3">10</p>
                            </div>
                            <div class="foot_2">
                                <p>活动订单净收入</p>
                                <p class="foot_3">₱2,116.8</p>
                            </div>
                            <div class="foot_1">
                                <p>活动订单量占比</p>
                                <p class="foot_3">15.57%</p>
                            </div>
                            <div class="foot_2">
                                <p>活动订单收入占比</p>
                                <p class="foot_3">9.8%</p>
                            </div> 
                            <div class="foot_1">
                                <p>活动订单优惠总额</p>
                                <p class="foot_3">₱200.62</p>
                            </div>
                            <div class="foot_2">
                                <p>活动订单客单价</p>
                                <p class="foot_3">₱200.62</p>
                            </div>
                        </div>
                </div>
                <div class="zh">
                    <span>1、活动净收入=顾客参与此活动的预计收入之和</span>
                    <span>2、活动订单客单价=活动订单营业额/活动订单笔数</span>
                </div>
            </van-tab>
        </van-tabs>
    </div>
</template>
<script>
import header1 from '../../components/BS/header1View.vue'
import {moni} from '../../https/MaRk'
export default {
    components:{
        header1   
    },
    data(){
        return{
            active: 0,
            h: '',
            active1:0
        }
    },
    created(){
        this.h = window.innerHeight + 'px'
        moni().then(res =>{
            console.log(res)
        })
    },
    methods: {
        change(){
            if(this.active1 == 0){
                moni().then(res =>{
                    console.log(res)
                })
            }
            if(this.active1 == 1){
                moni().then(res =>{
                    console.log(res)
                })
            }
            if(this.active1 == 2){
                moni().then(res =>{
                    console.log(res)
                })
            }
            if(this.active1 == 3){
                moni().then(res =>{
                    console.log(res)
                })
            }
            if(this.active1 == 4){
                moni().then(res =>{
                    console.log(res)
                })
            }
        }
    },
}
</script>
<style scoped>
.use1{
    background-color: #f5f5f5f5;
}
.show{
    width: 90%;
    background-color: #FFFFFF;
    margin: 20px auto;
    border-radius: 10px;
}
.show_1{
    width: 90%;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
}
.show_2{
    font-size: 15px;
}
.show_10{
    font-size: 12px;
    color: #79798f;
    width: 90%;
    height: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px auto;
    border-top: 1px solid #f5f5f5;
}
.show_11{
    width: 100%;
    height: 50px;
    font-size: 16px;
    color: #797979;
    text-align: center;
}
.card1{
    margin-top: 15px;
    
}
.last{
    width: 90%;
    height: 300px;
    background-color: #ffffff;
    margin: 20px auto;
}
.foot{
    margin: auto;
    width: 90%;
    height: 100%;
    font-size: 12px;
    display: grid;
    grid-template-columns: repeat(2,1fr);
}
.foot_1{
   text-align: start;
}
.foot_2{
    text-align: end;
}
.foot_3{
    color: #cc0052;
    font-size: 20px;
}
.zh{
    width: 90%;
    margin: 20px auto;
    font-size: 12px;
    color:#999999 ;
    display: flex;
    flex-direction: column;
}
</style>